package com.itheima.抽象类.抽象类入门_01;

//动物类
public abstract class Animal {
    //抽象方法:被abstract修饰的方法
    public abstract void eat();
}
//猫类
class Cat extends Animal{
    @Override
    public void eat(){
        System.out.println("猫吃鱼...");
    }
}
//狗类
class Dog extends Animal{
    @Override
    public void eat(){
        System.out.println("狗吃骨头...");
    }
}